from django.conf.urls.defaults import patterns
from portal.views import PortalsListView, CreatePortalView, UpdatePortalView
from django.contrib.auth.decorators import login_required
from django.views.generic.detail import DetailView
from portal.models import Portal

urlpatterns = patterns(
    "portal.view"
    , (r"^$", login_required(PortalsListView.as_view()))
    , (r"^add/$", login_required(CreatePortalView.as_view()))
    , (r"^(?P<pk>\d+)/$", login_required(UpdatePortalView.as_view()))
    , (r"^(?P<pk>\d+)/created/$", login_required(DetailView.as_view(model = Portal)))
)
